#pragma once

#include "Utilies.h"

namespace vkengine
{
	class Window;
	class Buffers;
	class Device;
	class Pipeline;
	class Texture;

	class Renderer
	{
	public:
		void Init(GLFWwindow* window);
		void CreateSyncObjects(VkDevice device);
		void DrawFrame(Window window, Device* device, Pipeline* pipeline, Buffers* buffers,Texture* texture);
		void DeviceWaitIdle(Device* device);
		
		void Cleanup(Device* device);

		uint32_t GetCurrentFrame() { return m_CurrentFrame; }
	private:
		
		std::vector<VkSemaphore>  m_ImageAvailableSemaphore;
		std::vector<VkSemaphore> m_RenderFinishedSemaphore;
		std::vector<VkFence> m_InFlightFence;

		uint32_t m_CurrentFrame = 0;
	public:
		bool m_FramebufferResized = false;
	};
}
